package com.atguigu.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.atguigu.springcloud.entity.CommonResult;
import com.atguigu.springcloud.service.TestService2;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

@RestController
@Slf4j
@Api("TestController")
@RequestMapping(value = "/consumer3")
public class TestController3 {
	@Autowired
	TestService2 testService;
	@Value("${server.port}")
	private String serverPort;
	
	
	@ApiOperation("查询")
	@GetMapping(value = "/t/test1")
	public CommonResult test1() {
		log.info("调用开始：" + serverPort);
		return testService.test1();
	}
	

	@ApiOperation("查询")
	@GetMapping(value = "/t/test2")
	public CommonResult test2() {
		log.info("调用开始：" + serverPort);
		return testService.test2();
	}
	 
	 
	@ApiOperation("查询")
	@GetMapping(value = "/t/test3")
	public CommonResult test3() {
		log.info("调用开始：" + serverPort);
		return testService.test2();
	}
	 
}
